<template>
  <div class="home-panel">
    <div class="container">
      <div class="head">
        <h3>{{ title }}</h3>
        <ul>
          <li v-for="(item,key) in subTitle" :key="key">
            {{item.name}}
          </li>
        </ul>
        <slot name="right" />
      </div>
      <slot />
    </div>
  </div>
</template>
    
    <script>
export default {
  name: 'HomePanel',
  props: {
    title: {
      type: String,
      default: ''
    },
    subTitle: {
      type: String && Array,
      default: ''
    }
  }
}
</script>
    
<style scoped lang='scss'>
@import "@/assets/css/color.scss";
.home-panel {
  background: #f5f5f5;
  .head {
    padding: 40px 0;
    display: flex;
    align-items: flex-end;
    ul {
      display: flex;
      list-style: none;
      li {
        height: 25px;
        margin-right: 5px;
        line-height: 25px;
        &:hover {
          background: $xtxColor;
        }
      }
    }
    h3 {
      flex: 1;
      font-size: 32px;
      font-weight: normal;
      margin-left: 6px;
      height: 35px;
      line-height: 35px;
      small {
        font-size: 16px;
        color: #999;
        margin-left: 20px;
      }
    }
  }
}
</style>
    